-- GENERATED SPELL FOR [Saronite Mine Slave] --


function spell0_31397(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_31397', 629, 1)
end

function spell1_31397(pUnit, Event) --@Head Crack,n/a--
pUnit:FullCastSpellOnTarget(3148,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31397', 20295, 1)
end

function Sorts_31397(pUnit, Event)
local choix_sorts_31397 = math.random(0, 1)
if choix_sorts_31397 == 0 then
pUnit:RegisterEvent('spell0_31397', 1, 1)
end
if choix_sorts_31397 == 1 then
pUnit:RegisterEvent('spell1_31397', 1, 1)
end
end

function mob31397_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31397', math.random(1500, 3000), 1)
end

function mob31397_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31397_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31397_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31397, 1, 'mob31397_Action')
RegisterUnitEvent(31397, 2, 'mob31397_Leave')
RegisterUnitEvent(31397, 3, 'mob31397_Kill')
RegisterUnitEvent(31397, 4, 'mob31397_Die')
